package net.wnag.order.servcice.impl;

import net.wang.gmall.domain.UserAddress;
import net.wang.gmall.service.IOrderService;
import net.wang.gmall.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;

/**
 * 1,将服务提供者注册到注册中心
 * 2,让服务消费者去注册中心订阅提供者的服务地址
 */
@Service
public class OrderService implements IOrderService {

    @Resource
    private IUserService userService;

    @Override
    public void initOrder(String uuid) throws IOException {

        List<UserAddress> userAddressList = userService.getUserAddressList("1a");
        System.out.println("uuid = [" + uuid + "]");
    }
}
